package com.lvcoding.sec2.secdemo2.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @description 描述
 * @date   2022-04-04 下午10:29
 * @author  wuyanshen
 */
@RequestMapping("test")
@RestController
public class TestController {

    @GetMapping("info")
    public Map info() {

        List<Integer> integers = Arrays.asList(1, 2, 3, 4, 5, 6);

        Map<String, Object> map = new HashMap<>();
        map.put("code", 200);
        map.put("msg", "请求成功");
        map.put("data", integers);

        return map;
    }
}
